const path = require('path')
const webpack = require('webpack')
const WebpackMerge = require('webpack-merge')
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const common = require('./webpack.common')

module.exports = WebpackMerge.merge(common, {
  mode: 'development',
  devServer: {
    contentBase: path.join(__dirname, 'public'),
    compress: true,
    port: 9000,
    hot: true
  },
  devtool: 'eval-cheap-module-source-map',
  target: 'web',
  plugins: [
    new webpack.HotModuleReplacementPlugin()
  ]
})
